/* ========================================
   合并CSS文件 - 优化加载性能
   合并文件：index_main.css + index.css
   删除重复样式，优化代码结构
======================================== */

/* ==== 基础样式重置 ==== */
html {
  line-height: 1.15;
  -webkit-text-size-adjust: 100%;
  font-size: 16px; /* 设置基础字体大小 */
  zoom: 1; /* 确保缩放正常 */
}

/* 确保在所有浏览器中都能正确缩放 */
* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 防止页面在缩放时出现意外滚动 */
html, body {
  overflow-x: hidden;
}

body {
  margin: 0;
  background-color: #FFF;
  color: #444;
  font-family: "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "WenQuanYi Micro Hei","Microsoft Yahei", sans-serif;
}

a {
  background-color: transparent;
  color: #3354AA;
  text-decoration: none;
}

a:hover, a:active {
  color: #444;
}

img {
  border-style: none;
  max-width: 100%;
  height: auto;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: 100%;
  line-height: 1.15;
  margin: 0;
}

/* ==== 网格系统 ==== */
.container, .row > [class*="col-"] {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

.container {
  margin-left: auto;
  margin-right: auto;
  padding-left: 10px;
  padding-right: 10px;
}

.row {
  margin-right: -10px;
  margin-left: -10px;
}

.row > [class*="col-"] {
  float: left;
  min-height: 1px;
  padding-right: 10px;
  padding-left: 10px;
}

/* 移动端网格 */
.col-mb-1 { width: 8.33333%; }
.col-mb-2 { width: 16.66667%; }
.col-mb-3 { width: 25%; }
.col-mb-4 { width: 33.33333%; }
.col-mb-5 { width: 41.66667%; }
.col-mb-6 { width: 50%; }
.col-mb-7 { width: 58.33333%; }
.col-mb-8 { width: 66.66667%; }
.col-mb-9 { width: 75%; }
.col-mb-10 { width: 83.33333%; }
.col-mb-11 { width: 91.66667%; }
.col-mb-12 { width: 100%; }

/* 平板网格 */
@media (min-width: 768px) {
  .container { max-width: 728px; }
  .col-tb-1 { width: 8.33333%; }
  .col-tb-2 { width: 16.66667%; }
  .col-tb-3 { width: 25%; }
  .col-tb-4 { width: 33.33333%; }
  .col-tb-5 { width: 41.66667%; }
  .col-tb-6 { width: 50%; }
  .col-tb-7 { width: 58.33333%; }
  .col-tb-8 { width: 66.66667%; }
  .col-tb-9 { width: 75%; }
  .col-tb-10 { width: 83.33333%; }
  .col-tb-11 { width: 91.66667%; }
  .col-tb-12 { width: 100%; }
}

/* 桌面网格 */
@media (min-width: 992px) {
  .container { max-width: 940px; }
  .col-1 { width: 8.33333%; }
  .col-2 { width: 16.66667%; }
  .col-3 { width: 25%; }
  .col-4 { width: 33.33333%; }
  .col-5 { width: 41.66667%; }
  .col-6 { width: 50%; }
  .col-7 { width: 58.33333%; }
  .col-8 { width: 66.66667%; }
  .col-9 { width: 75%; }
  .col-10 { width: 83.33333%; }
  .col-11 { width: 91.66667%; }
  .col-12 { width: 100%; }
}

/* ==== 页面布局 ==== */
#header {
  padding-top: 35px;
  border-bottom: 1px solid #EEE;
}

#logo img {
  max-height: 64px;
}

#body {
  padding: 20px 0;
}

.post-content {
  line-height: 1.5;
}

/* 清除浮动 */
.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

/* 隐藏元素 */
.kit-hidden-tb {
  display: none;
}

@media (min-width: 768px) {
  .kit-hidden-tb {
    display: block;
  }
}

/* ========================================
   组件样式 - 从index.css合并
======================================== */

/* ==== 语言选择器样式 ==== */
.language-section {
    margin-top: 10px;
    text-align: center;
}

/* 语言按钮组容器 */
.language-section {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

/* 新的语言按钮样式 */
.language-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 2px solid #e0e6ed;
    border-radius: 12px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.language-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.language-btn:hover::before {
    left: 100%;
}

.language-btn:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.25);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.language-btn:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
    transform: translateY(-1px);
}

.language-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.language-btn.active {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    transform: translateY(-1px);
}

.language-btn.active:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-2px);
}

/* 语言按钮波纹效果 */
.language-btn .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* 旧的select样式保留以兼容 */
.language-select {
    width: 100%;
    max-width: 180px;
    padding: 8px 12px;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    color: #333;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.language-select:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.language-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.language-select option {
    padding: 8px;
    background: #ffffff;
    color: #333;
}

/* ==== 搜索表单样式 ==== */
.search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 15px;
}

.search-select {
    flex: 0 0 auto;
    min-width: 120px;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #ffffff;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.search-select:hover,
.search-select:focus {
    border-color: #667eea;
    outline: none;
}

.search-input {
    flex: 1 1 150px;
    min-width: 120px;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #ffffff;
    color: #333;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.search-input:hover,
.search-input:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.search-button {
    flex: 0 0 auto;
    padding: 8px 16px;
    border: 1px solid #667eea;
    border-radius: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-button:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.search-button:active {
    transform: translateY(0);
}

/* ==== 导航区块样式 ==== */
.nav-section {
    margin: 30px 0;
}

.nav-section h3 {
    color: #333;
    margin: 20px 0 10px 0;
    border-bottom: 2px solid #007cba;
    padding-bottom: 5px;
    font-size: 18px;
    font-weight: 600;
}

.nav-section:first-child h3 {
    border-bottom-color: #007cba;
}

.nav-section:last-child h3 {
    border-bottom-color: #ff6b35;
}

/* ==== 横幅网格样式 ==== */
.banner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin: 20px 0;
}

.banner-grid a {
    display: block;
    padding: 12px 16px;
    text-align: center;
    text-decoration: none;
    background: linear-gradient(135deg, #f8f9ff 0%, #e8ecff 100%);
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.banner-grid a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.3);
    border-color: #667eea;
}

.banner-grid a:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.banner-grid a span {
    display: block;
    font-weight: 500;
}

/* ==== 站点信息样式 ==== */
.site-info {
    margin-bottom: 20px;
}

.site-address {
    text-align: center;
    font-size: 14px;
    color: #666;
    margin: 20px 0;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #007cba;
}

.site-address span {
    margin-right: 8px;
}

.site-address b {
    color: #333;
    font-weight: 600;
}

/* ==== 页脚样式 ==== */
#footer {
    clear: both;
    width: 100%;
    margin: 40px 0 0 0;
    padding: 20px 0;
    text-align: center;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.copyright {
    margin: 0;
    padding: 0;
    font-size: 14px;
    color: #666;
    text-align: center;
    line-height: 1.5;
}

/* ==== 动画效果 ==== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.banner-grid {
    animation: fadeIn 0.5s ease-out;
}

/* ========================================
   响应式设计合并版本
======================================== */

/* 平板和桌面端响应式 */
@media (min-width: 768px) {
    .search-form {
        flex-wrap: wrap;
    }
    
    .banner-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    /* 语言按钮在桌面端的间距 */
    .language-section {
        gap: 10px;
    }
    
    .language-btn {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
}

@media (max-width: 768px) {
    .search-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-select,
    .search-input,
    .search-button {
        flex: 1 1 100%;
        margin-bottom: 8px;
    }
    
    /* 语言按钮在移动端的样式 */
    .language-section {
        gap: 6px;
        margin-top: 8px;
    }
    
    .language-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
        border-radius: 10px;
    }
    
    .language-select {
        max-width: 100%;
    }
    
    .banner-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 8px;
    }
    
    .banner-grid a {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .site-address {
        font-size: 13px;
        padding: 10px;
    }
    
    .nav-section h3 {
        font-size: 16px;
    }
    
    /* 页脚响应式设计 */
    #footer {
        margin: 20px 0 0 0;
        padding: 15px 0;
    }
    
    .copyright {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .banner-grid {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }
    
    .banner-grid a {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    /* 页脚响应式设计 */
    #footer {
        margin: 15px 0 0 0;
        padding: 12px 0;
    }
    
    .copyright {
        font-size: 12px;
    }
}

/* ========================================
   深色模式支持
======================================== */

@media (prefers-color-scheme: dark) {
    /* 基础样式 */
    body {
        background-color: #1a202c;
        color: #e2e8f0;
    }
    
    /* 表单元素 */
    .language-select,
    .search-select,
    .search-input {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    /* 深色模式下的语言按钮样式 */
    .language-btn {
        background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
        border-color: #4a5568;
        color: #e2e8f0;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }
    
    .language-btn::before {
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    }
    
    .language-btn:hover {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        border-color: #667eea;
        color: white;
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    }
    
    .language-btn.active {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        border-color: #667eea;
        color: white;
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    }
    
    .language-btn.active:hover {
        background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    }
    
    .language-btn:focus {
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
    }
    
    /* 横幅网格 */
    .banner-grid a {
        background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .banner-grid a:hover {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: #ffffff;
    }
    
    /* 站点信息 */
    .site-address {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .nav-section h3 {
        color: #e2e8f0;
    }
    
    /* 页脚 */
    #footer {
        background: #2d3748;
        border-top-color: #4a5568;
    }
    
    .copyright {
        color: #a0aec0;
    }
}